package com.nbsaas.boot.marketing.rest.convert;

import com.nbsaas.boot.marketing.data.entity.PointsRecord;
import com.nbsaas.boot.marketing.api.domain.request.PointsRecordRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 积分记录请求对象转换成实体对象
*/

public class PointsRecordEntityConvert  implements Converter<PointsRecord, PointsRecordRequest> {

    @Override
    public PointsRecord convert(PointsRecordRequest source) {
        PointsRecord result = new PointsRecord();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

